<script>
	export default {
		onLaunch: function() {
			console.log('App Launch');
			setInterval(this.run,5000);
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods:{
			run() {
					  uni.request({
					  		url:"http://192.168.246.82:8083/data/getlight",
					  		method:"GET",
					  		success(res) {
					  			console.log(res),
					  			console.log("已进入"),
								uni.$emit('update_ligdata',res)
					  		},
					  		fail() {
					  			console.log("失败")
					  		}
					  	})
			  }
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
